package com.igoal.service;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.igoal.dto.CityDTO;
import com.igoal.dto.CompanyDTO;
import com.igoal.dto.HobbyDTO;
import com.igoal.dto.SchoolDTO;
import com.igoal.dto.UserDTO;
import com.igoal.dto.UserInfoDTO;

public interface UserAccountService {
	@Transactional(readOnly = true)
	Long register(UserDTO newUser);
	
	@Transactional(readOnly = true)
	List<SchoolDTO> getUserSchools(String username);
	
	@Transactional(readOnly = true)
	List<CompanyDTO> getUserCompanies(String username);
	
	@Transactional(readOnly = true)
	Map<String, String> getUserCategories(String username);
	
	@Transactional(readOnly = true)
	Map<String, Map<String, String>> getUserHobbies(String username);
	
	@Transactional(readOnly = true)
	UserInfoDTO getUserInfo(String username);
	
	@Transactional(readOnly = true)
	List<CityDTO> getAllCities();
	
	@Transactional(readOnly = false)
	int updateUserBasicInformation(String username, String firstName, String middleName, String lastName, 
			Integer birthdayDate, Integer birthdayMonth, Integer birthdayYear,
			boolean isMale, String aboutMe, String email);
	
	@Transactional(readOnly = false)
	int updateUserContactInformation(String username, String yahoo, String skype, String facebook, 
			String website, String mobile);
	
	@Transactional(readOnly = false)
	int updateUserResidentInformation(String username, String address, String district, Long cityId);
	
	@Transactional(readOnly = false)
	int updateUserSchools(String username, SchoolDTO[] schools);
	
	@Transactional(readOnly = false)
	int updateUserCompanies(String username, CompanyDTO[] companies);
	
	@Transactional(readOnly = false)
	int activateAccount(String username, String code);
	
	@Transactional(readOnly = true)
	boolean isActivatedAccount(String username);
	
	@Transactional(readOnly = false)
	int updateUserHobbies(String username, HobbyDTO[] hobbies);
}
